﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="facility.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.hotel.facility" %>

<%@ Register Src="../usercontrol/titlepage.ascx" TagName="titlepage" TagPrefix="uc2" %>

<%@ Register assembly="Book38.Net.CustomControl" namespace="Book38.Net.CustomControl" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
      <title></title>
      <link type="text/css" href="../../style/main.css" rel="Stylesheet" /> 
     </head>
<body>
    <form id="form1" runat="server">
    <uc2:titlepage id="Titlepage1" runat="server" inittitle="<%$ Resources:Site, TitleFacility %>"></uc2:titlepage>
        <table cellpadding="0" cellspacing="0" class="main-table" >
            <tr><td>
            <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                    <td width="40%" style="height: 13px">&nbsp;</td>
                    <td width="60%" align="center" style="height: 13px"><div align="center">
                      <table width="300" border="0" align="right" cellpadding="0" cellspacing="0">
                        <tr  class="line-odd">
                          <td id="link1"><div align="center" onclick="getall();"><asp:Literal ID="Literal1" Text="<%$ Resources:Site, LabBaseFac %>" runat="server"></asp:Literal>
                              </div></td>
                          <td id="link2" class="title1"><div align="center" onclick="javascript:getother();"><asp:Literal ID="Literal2" Text="<%$ Resources:Site, LabOtherFac %>" runat="server"></asp:Literal></div></td>
                        </tr>
                      </table>
                    </div></td>
                  </tr>
            </table>
            </td></tr>
            <tr class="line-even">
                <td >                 
               <div id="loadinfo" align="center"></div>      
                    </td></tr>            
                  <tr>
                    <td colspan="2" align="center" valign="middle">
                        <input type="button" id="btnsave" class="bttn" value="<%= Resources.Site.ButtonModify %>" />
                      </td>
                  </tr>
                </table>                
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
function getall()
{
  $F("link1").className="line-odd";
  $F("link2").className="title1";
  EZCRS.HCMS.myajax.AjaxHotelInfo.gatfacility(function(resp){$F("loadinfo").innerHTML=resp.value;});
  $F("btnsave").onclick=function(){saveall();};
}

getall();

function saveall()
{
  str=$FN("ckl");
  EZCRS.HCMS.myajax.AjaxHotelInfo.savefacility(str,function(resp){if(resp.value=="1")alert("<%= Resources.Site.SystemMaintainSuccess %>");});
}

function getother()
{
  $F("link1").className="title1";
  $F("link2").className="line-odd";
  EZCRS.HCMS.myajax.AjaxHotelInfo.savefacilityother(function(resp){$F("loadinfo").innerHTML=resp.value;});
  $F("btnsave").onclick=function(){saveother();};
}

function saveother()
{
  EZCRS.HCMS.myajax.AjaxHotelInfo.saveother($F("hy").value,$F("cy").value,$F("bc").value,$F("kl").value,$F("aq").value,$F("rh").value,function(resp){if(resp.value=="1")alert("修改成功！");});
}
</script>